let app = getApp()
Component({
    properties: {
      },
      data:{
        loginShow:false,
        isShowVideo:1
      },
      pageLifetimes: {
        show: function () {
          var that=this
          wx.request({
            url: app.globalData.siteroot,
            data: {
              do:'Member_staffInfo',
              staff_id:wx.getStorageSync('staff_bind_id'),
            },
            success: function(res) {
              that.setData({
                userInfo:res.data.info
              })
            }
          })
        }
      },
    lifetimes: {
        attached: function () {
          this.setData({
            isShowVideo:wx.getStorageSync('site_config').bus_upvideo
          })
         }
      },
    methods: {
      jumpnav:function(e){
        wx.navigateTo({
          url: e.currentTarget.dataset.url,
        })
      },
      jumpnav2:function(e){
        var that=this
    wx.request({
      url: app.globalData.siteroot,
       data: {
         do:'Message_getPushTmplIds',
         temp_name:'leave_message,place_order,visit_message'
      },
     success: function(res) {
        var leave_message=res.data.info.leave_message
        wx.requestSubscribeMessage({
            tmplIds: [leave_message],
            success (res) {
                wx.request({
                    url: app.globalData.siteroot,
                     data: {
                       do:'Member_subscribeTimes',
                       subscribe_data:[{"leave_message":1},{"place_order":0},{"visit_message":0}],
                       staff_id:wx.getStorageSync('staff_bind_id')
                    },
                   success: function(res) {
                    wx.navigateTo({
                      url: e.currentTarget.dataset.url,
                    })
                   }
                  })
            }
        })
     }
    })
       
      },
      editinfo:function(){
          wx.navigateTo({
            url: '/business-service/pages/staff_mine/editData',
          })
      }
    }
});
